#!/bin/sh
##   BX_VOD
/usr/bin/mysql  BX_VOD -e "REPAIR TABLE TB_AD_BillDetails;"
/usr/bin/mysql  BX_VOD -e "REPAIR TABLE TB_AD_Playlist_fromSrv;"
/usr/bin/mysql  BX_VOD -e "REPAIR TABLE TB_DM_DataSyncTrack;"
/usr/bin/mysql  BX_VOD -e "REPAIR TABLE TB_DM_DistributionTrack;"
/usr/bin/mysql  BX_VOD -e "REPAIR TABLE TB_AD_BillDetails;"
/usr/bin/mysql  BX_VOD -e "REPAIR TABLE TB_AD_Playlist;"
/usr/bin/mysql  BX_VOD -e "REPAIR TABLE TB_AD_PlaylistM1;"
/usr/bin/mysql  BX_VOD -e "REPAIR TABLE TB_AD_PlaylistM1_fromSrv;"
/usr/bin/mysql  BX_VOD -e "REPAIR TABLE TB_SongFileDownload;"
/usr/bin/mysql  BX_VOD -e "DELETE FROM TB_AD_BillDetails WHERE STATUS=1;"
/usr/bin/mysql  BX_VOD -e "DELETE FROM TB_AD_Playlist_fromSrv WHERE IsDel=0 AND IsTure=0;"
/usr/bin/mysql  BX_VOD -e "DELETE FROM TB_AD_PlaylistM1_fromSrv WHERE IsDel=0 AND IsTure=0;"
/usr/bin/mysql  BX_VOD -e "DELETE FROM TB_AD_Playlist WHERE KTVUpdateTime<=DATE_SUB(NOW(),INTERVAL 1 HOUR);"
/usr/bin/mysql  BX_VOD -e "DELETE FROM TB_AD_PlaylistM1 WHERE KTVUpdateTime<=DATE_SUB(NOW(),INTERVAL 1 HOUR);"
##   BX_VOD_AD
/usr/bin/mysql  BX_VOD_AD -e "REPAIR TABLE TB_AD_BillDetails;"
/usr/bin/mysql  BX_VOD_AD -e "REPAIR TABLE TB_AD_PlaylistM1_fromSrv;"
/usr/bin/mysql  BX_VOD_AD -e "REPAIR TABLE TB_AD_Playlist_fromSrv;"
/usr/bin/mysql  BX_VOD_AD -e "REPAIR TABLE TB_AD_Playlist_fromSrv1;"
/usr/bin/mysql  BX_VOD_AD -e "REPAIR TABLE TB_AD_Playlist_fromSrv2;"
/usr/bin/mysql  BX_VOD_AD -e "REPAIR TABLE TB_AD_Playlist_fromSrv3;"
/usr/bin/mysql  BX_VOD_AD -e "DELETE FROM TB_AD_BillDetails WHERE STATUS=1;"
/usr/bin/mysql  BX_VOD_AD -e "DELETE FROM TB_AD_Playlist_fromSrv1 WHERE IsDel=0 AND IsTure=0;"
/usr/bin/mysql  BX_VOD_AD -e "DELETE FROM TB_AD_Playlist_fromSrv2 WHERE IsDel=0 AND IsTure=0;"
/usr/bin/mysql  BX_VOD_AD -e "DELETE FROM TB_AD_Playlist_fromSrv3 WHERE IsDel=0 AND IsTure=0;"

##   bestarmedia_node
/usr/bin/mysql bestarmedia_node -e "REPAIR TABLE node_room_song_list;"
